home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / GRAPH.SWG / 0022_TGA.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-04  |  5KB  |  83 lines

  1. --------I-TARGA-----------------------------
  2.  
  3. The  Targa-File format is an image file format used by a wide variety of
  4. both scanners and imaging software, and exists in many incarnations. The
  5. information  has been taken from Appendix  C of the Truevision Technical
  6. Guide.Requests for further information could be directed to:
  7.  
  8.            AT&T
  9.            Electronic Photography and Imaging Center
  10.            2002 Wellesley Ave.
  11.            Indianapolis, IN 42619
  12.  
  13. The  lack  of completeness is due to  the fact that the Targa recognizes
  14. over half a dozen image file formats, some of which are more widely used
  15. than others.
  16.  
  17.  
  18. OFFSET              Count TYPE   Description
  19. 0000h                   1 byte   Length of image identification field (below)
  20. 0001h                   1 byte   Color map type :
  21.                                  0 - no color map
  22.                                  1 - 256 entry palette
  23. 0002h                   1 byte   Image type :
  24.                                   0 - no image data included
  25.                                   1 - Uncompressed, color-mapped image
  26.                                   2 - Uncompressed, RGB image
  27.                                   3 - Uncompressed, black and white image
  28.                                   9 - RLE encoded color-mapped image
  29.                                  10 - RLE encoded RGB image
  30.                                  11 - Compressed, black and white image
  31.                                  32 - Compressed color-mapped data, using
  32.                                       Huffman, Delta, and runlength encoding.
  33.                                  33 - Compressed color-mapped data, using
  34.                                       Huffman, Delta, and RLE.  4-pass quadtree-
  35.                                       type process.
  36. 0003h                   1 word   Index of first color map entry
  37. 0005h                   1 word   Count of color map entries
  38. 0007h                   1 byte   Number of bits per color map entry
  39. 0008h                   1 word   X coordinate of the lower left corner of
  40.                                  the image.
  41. 000Ah                   1 word   Y coordinate of the lower left corner of
  42.                                  the image.
  43. 000Ch                   1 word   Width of the image in pixels
  44. 000Eh                   1 word   Height of the image in pixels
  45. 0010h                   1 byte   Bytes per pixel
  46. 0011h                   1 byte   Flags (bitmapped):
  47.                                  0-3 : Number of attribute bits
  48.                                    4 : reserved
  49.                                    5 : Screen origin in upper left corner
  50.                                  6-7 : Data storage interleave
  51.                                        00 - no interleave
  52.                                        01 - even/odd interleave
  53.                                        10 - four way interleave
  54.                                        11 - reserved
  55.                                  The byte should be set to 0. Don't know why.
  56. 0012h                   ? char   Image identification string, usually not there,
  57.                                  when the length (see up) is 0.
  58. ????h                   ? byte   Color map data
  59.                                  Depending on the number of bits per color map
  60.                                  entry, the entries here have a different size.
  61.                                  4 bytes : 1 byte for blue
  62.                                            1 byte for green
  63.                                            1 byte for red
  64.                                            1 byte for attribute
  65.                                  3 bytes : 1 byte for blue
  66.                                            1 byte for green
  67.                                            1 byte for red
  68.                                  2 bytes : Bitmapped as a word in Intel byte
  69.                                            order as follows :
  70.                                            ARRRRRGG GGGBBBBB
  71. ????h                   ? byte   Image data
  72.                                  For images of type 9 (using RLE), the image
  73.                                  data is divided into packets, the first byte
  74.                                  being the indicator for repetition or copy.
  75.                                  If bit 7 of the first byte is set, then repeat
  76.                                  (first byte and 07Fh+1) times the next byte,
  77.                                  otherwise copy first byte+1 pixels from data
  78.                                  stream. RLE packets may cross scan lines !
  79. EXTENSION:TGA
  80. OCCURENCES:PC
  81. SEE ALSO:
  82.  
  83.